package org.fujene.structure;

public class Term {
	private String str;
	private int freq;
	
	public Term(String str) {
		this.str = str;
		this.freq = 1;
	}
	
	public void increment(){
		this.freq++;
	}
	
	public String str(){
		return this.str;
	}
	
	public int freq(){
		return this.freq;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Term)
			return str.equals(((Term)obj).str);

		return false;
	}
	
	public boolean equals(String str){
		return this.str.equals(str);
	}
}
